<?php

namespace App\Http\Controllers\Home;

use App\Http\Controllers\Controller;
use App\Models\Happy;

class HappyController extends Controller
{
    //不开心嘛？点我点我
    public function happy()
    {
        $happy = Happy::inRandomOrder()->take(1)->get();
        $data = [
            'code'=>1,
            'msg'=>'获取成功',
            'data'=>$happy,
        ];
        return response()->json($data);
    }


}
